package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.OfflineOrdersBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 线下支付订单排期 Mapper 接口
 * </p>
 *
 * @author zhaopenghui
 * @since 2019-08-22
 */
public interface OfflineOrdersMapper extends RootMapper<OfflineOrdersBean> {

    /**
     * 获取线下支付订单排期
     *
     * @param orderCode
     * @param scheduleId
     * @return
     */
    OfflineOrdersBean getOffline(@Param("offlineId") Integer offlineId, @Param("orderCode") Long orderCode, @Param("scheduleId") Integer scheduleId);

    /**
     * 获取线下支付id集合
     *
     * @param orderCode
     * @return
     */
    List<Integer> getOfflineIdList(@Param("orderCode") Long orderCode);

    /**
     * 批量添加
     *
     * @param offlineOrdersList
     * @return
     */
    int createBatch(List<OfflineOrdersBean> offlineOrdersList);

    /**
     * 根据线下支付id获取排期id
     *
     * @param offlineId
     * @return
     */
    List<Integer> getScheduleIdList(@Param("offlineId") Integer offlineId);

    /**
     * 获取线下支付排期集合
     *
     * @param offlineId
     * @return
     */
    List<OfflineOrdersBean> getOfflineOrdersList(@Param("offlineId") Integer offlineId);

}